#ifndef BUZZER_H
#define BUZZER_H

#include <QString>

class BuzzerPrivate;
class Buzzer
{
public:
    ~Buzzer();
    static Buzzer *instance();

    /**
     * @brief start 开始蜂鸣
     */
    void start();

    /**
     * @brief stop 停止蜂鸣
     */
    void stop();

    /**
     * @brief setVolume 设置音量
     * @param value 音量值 0-100
     */
    void setVolume(int value);

    /**
     * @brief setAudiofile 设置报警音频文件
     * @param wavFile wav格式音频文件
     */
    void setAudiofile(const QString &wavFile);

private:
    BuzzerPrivate *d;
    Buzzer();
    Q_DISABLE_COPY(Buzzer)
};

#endif // BUZZER_H
